//
//  UITextField+ValueWidth.m
//  LeaveLight
//
//  Created by pro1 on 2019/3/13.
//  Copyright © 2019 xsl. All rights reserved.
//

#import "UITextField+ValueWidth.h"

@implementation UITextField (ValueWidth)

- (CGFloat)getContentStrWidth{
    if (!self.text || self.text.length == 0) {
        return 20;
    }
    return [self.text sizeWithAttributes:@{NSFontAttributeName:self.font}].width + 20;
}

@end
